package exam.axhu.service;

import java.util.List;

import exam.axhu.entity.Exam;
import exam.axhu.entity.ExamPaper;
import exam.axhu.entity.TestPaper;



public interface ExamService {

	public int addExam(Exam exam);
	public void deleteExam(String... examIDs); //顺便删除试题信息、答题信息
	public void updateExam(Exam exam);
	public Exam findByExamID(String examID);
	public List<Exam> findByCourseID(String courseID);
	public int setStatus(Exam exam, int status);
	
	public int addExamPaper(String examID, String item, String itemID);
	public void deleteExamPaper(String examID, String item, String itemID);
	public void deleteWholeExamPaper(String examID);
	//public void updateExamPaper(String examID, String item, String itemID);
	public void updateExamPaper(ExamPaper examPaper);
	public ExamPaper searchExamPaper(String examID, String item, String itemID);
	public ExamPaper findByExamPaperID(String examPaperID);
	public List<ExamPaper> listExamPaperByExamID(String examID);
	public List<ExamPaper> listExamPaperByChoiceItem(String examID);
	public List<ExamPaper> listExamPaperByJudgeItem(String examID);
	public List<ExamPaper> listExamPaperByShortAnswerItem(String examID);
	
	
	public int addTestPaper(String examPaperID, String studentID, String answer);
	public int addTestPaper(String examPaperID, String studentID, String answer,int mark);
	public void deleteTestPaper(String examPaperID, String studentID, String answer);
	public void deleteWholeTestPaper(String examPaperID);   //顺便删除答题信息
	//public void updateTestPaper(String examPaperID, String studentID, String answer);
	public void updateTestPaper(TestPaper testPaper);
	public void updateTestPaper(int testPaperID, int mark);
	public TestPaper findByTestPaperID(int testPaperID);
	public TestPaper searchTestPaper(String examPaperID, String studentID, String answer);
	public TestPaper searchTest(String examPaperID, String studentID);
	public List<TestPaper> listTestPaperByExamPaperID(String examPaperID);
	public List<TestPaper> listTestPaperByStudentID(String studentID);     
//	public List<TestPaper> listTestPaperByChoiceItem(String examID);
//	public List<TestPaper> listTestPaperByJudgeItem(String examID);
//	public List<TestPaper> listTestPaperByShortAnswerItem(String examID);
	
	public List<Exam> listExamsByCourseAndStatus(String courseID, int status);
}